Skip to content

Add notice response message support#117

Merged
SeanTAllen merged 3 commits intomainfrom
notice-response-handling
Feb 13, 2026
Merged

Add notice response message support#117
SeanTAllen merged 3 commits intomainfrom
notice-response-handling

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

PostgreSQL sends NoticeResponse messages for non-fatal informational feedback (e.g., "table does not exist, skipping" on DROP TABLE IF EXISTS, RAISE NOTICE from PL/pgSQL). The driver previously parsed and silently discarded these. This change surfaces them to users via a new pg_notice callback on SessionStatusNotify.

  • New NoticeResponseMessage type (separate from ErrorResponseMessage — distinct semantics)
  • Shared field parsing via _ResponseFieldBuilder extracted from the ErrorResponse parser
  • Notices delivered in all connected states (including during authentication)
  • Mock server tests (delivery, mid-data-rows interleaving), integration test (DROP TABLE IF EXISTS), parser tests, and an example

PostgreSQL sends NoticeResponse messages for non-fatal informational
feedback (e.g., "table does not exist, skipping" on DROP TABLE IF EXISTS,
RAISE NOTICE from PL/pgSQL). The driver previously parsed and silently
discarded these. This change surfaces them to users.

New NoticeResponseMessage type (separate from ErrorResponseMessage per
distinct-semantics-deserve-distinct-representations). Shared field parsing
via _ResponseFieldBuilder extracted from the ErrorResponse parser. Notices
are delivered in all connected states (including during authentication)
since PostgreSQL can send them at any time, unlike LISTEN/NOTIFY
notifications which require executing LISTEN first.

Includes mock server tests (delivery, mid-data-rows interleaving),
integration test (DROP TABLE IF EXISTS), parser tests, and an example.
@SeanTAllen SeanTAllen added the changelog - added Automatically add "Added" CHANGELOG entry on merge label Feb 13, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 13, 2026
@SeanTAllen SeanTAllen changed the title Surface NoticeResponse messages via pg_notice callback Add notice response message support Feb 13, 2026
@SeanTAllen SeanTAllen merged commit 087ab98 into main Feb 13, 2026
8 checks passed
@SeanTAllen SeanTAllen deleted the notice-response-handling branch February 13, 2026 12:27
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Feb 13, 2026
github-actions bot pushed a commit that referenced this pull request Feb 13, 2026
SeanTAllen added a commit that referenced this pull request Apr 7, 2026
The old release-notes bot created separate files for PR #117 (notice
response) and PR #127 (row streaming) but never consolidated them into
next-release.md. Row streaming was also missing from the CHANGELOG.
SeanTAllen added a commit that referenced this pull request Apr 7, 2026
The old release-notes bot created separate files for PR #117 (notice
response) and PR #127 (row streaming) but never consolidated them into
next-release.md. Row streaming was also missing from the CHANGELOG
entirely.

- Merge `.release-notes/add-row-streaming.md` content into
`next-release.md` (between COPY OUT and SSLPreferred, matching PR order)
- Merge `.release-notes/notice-response.md` content into
`next-release.md` (between COPY IN and bytea, matching PR order)
- Add missing `Add row streaming support (#127)` entry to CHANGELOG
- Delete the now-consolidated separate release note files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - added Automatically add "Added" CHANGELOG entry on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants